package cn.com.roy.thread.t3_1_13.pipereaderwriter;


import java.io.PipedOutputStream;
import java.io.PipedWriter;

public class ThreadWrite extends Thread{
    private PipedWriter pipedWriter;
    private WriteData writeData;

    public ThreadWrite(WriteData writeData , PipedWriter pipedWriter){
        this.pipedWriter = pipedWriter;
        this.writeData = writeData;
    }

    @Override
    public void run() {
        super.run();
        writeData.writeData(pipedWriter);
    }
}
